Far too busy/unmotivated for secondary optimisation, so here is this monstrosity. For optimum rate, no cost is too great.